package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.Place.Zone;

import es.ats.codington.festival.domain.TraditionalMarket;



public class TraditionalMarketMapper implements RowMapper<TraditionalMarket>{

	@Override
	public TraditionalMarket mapRow(ResultSet resultSet, int numRow) throws SQLException {
		TraditionalMarket traditionalMarket = new TraditionalMarket();
		

		traditionalMarket.setIdPlace(resultSet.getInt("idPlace"));
		traditionalMarket.setPlaceName(resultSet.getString("placeName"));
		traditionalMarket.setZone(Zone.SOUTH);
		traditionalMarket.setMarketName(resultSet.getString("marketName"));
			
			
		return traditionalMarket;
	}

}
